package com.greenx.hello;

import java.util.HashMap;

public class HelloWorld {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// System.out.println("");
		// Integer isInt = (Integer) null;
		long begin = System.currentTimeMillis();
		System.out
				.println("====================Begin=========================");

		System.out.println("CLASS NAME: "+HelloWorld.class.getName());
		HelloWorld.testHashMap();

		// String str1="AdvertisingCustomSquare210210";
		// String
		// str2="ClientSiteAdministration&#045;AdvertisingCustomSquare210210";
		//
		// System.out.println("indexOf: "+str2.indexOf(str1));
		//
		// str1="AdvertisingFullBanner46860";
		// str2="ClientSiteAdministration&#045;AdvertisingCustomSquare46860";
		//
		// System.out.println("indexOf: "+str2.indexOf(str1));
		//
		// str1="ClientSiteAdministration";
		// str2="ClientSiteAdministration-AccentureEABooking";
		//
		// System.out.println("indexOf: "+str2.indexOf(str1));

		// String auidStr = "";
		// String clientState = "";
		// String pagesList =
		// "homepage@flightsearch@toursandactivities@travelerservices@destinationintelligence@meetingsandevents";
		// System.out.println(pagesList);
		// String auidKeypre = "portal.1stAdvertising.auid.";
		// String clientStateKeyPre = "portal.1stAdvertising.clientState.";
		// String layoutURL =
		// "https://portal.qa.carlsonwagonlit.com/group/general-test-client/travelerservices";
		// if (pagesList != null) {
		// String[] pagesArray = pagesList.split("@");
		//
		// for (int i = 0; i < pagesArray.length; i++) {
		// String pageName = pagesArray[i];
		//
		// if (layoutURL.indexOf(pageName) > 0) {
		// auidStr = auidKeypre + pageName;
		// clientState = clientStateKeyPre + pageName;
		// break;
		// }
		// System.out.println("i: " + i);
		// }
		// }
		//
		// System.out.println(auidStr + "|" + clientState);

		long end = System.currentTimeMillis();
		double takenTime = (end - begin);
		System.out.println("It takes " + takenTime);
		System.out.println("====================END=========================");
		// Integer.parseInt("");
		// boolean flag =
		// Contants.INVALID_REQUEST_EXCEPTION.equals(Contants.INVALID_RESPONSE_EXCEPTION);
		// System.out.println("" + flag);

		// String id = Contants.DATASERVICE_EXCEPTION.getMessage();
		// System.out.println("id---" + id);
		// System.out.println("id---" + Contants.getContants(id).getMessage());

		/**
		 * Random r = new Random(); for (int i = 0; i < 10; i++) { int random =
		 * r.nextInt(2); System.out.println(random); }
		 * 
		 */

		/*
		 * String str=" hello  world!"; System.out.println("|"+str+"|");
		 * System.out.println("|"+str.trim()+"|");
		 * System.out.println("|"+str.replace(" ", "")+"|");
		 * 
		 * char[] vinChar=str.toCharArray(); for(int i=0;i<vinChar.length;i++){
		 * 
		 * }
		 * 
		 * //test the integer
		 * 
		 * 
		 * Integer hi = null; Integer hi2 = new Integer("Str123"); if (hi2
		 * instanceof Integer){ System.out.println("ll"); }else{ return; }
		 * 
		 * System.out.println("hi:" + hi + "hi2" + hi2);
		 */

	}

	/**
     * 
     */
	private static void testFor() {

		for (int i = 0; i < 1000; i++) {
			if (i == 100) {
				continue;
			} else if (i == 102) {
				break;
			}
			System.out.println("i= " + i);

		}

	}

	private static void testHashMap() {

		HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
		hm.put(1011474, 1011474);
		hm.put(914453592, 914453592);
		hm.put(14453592, 14453592);
		if (hm.containsKey(14453592)) {
			System.out.println("key= " + 14453592);
		}
	}

}
